import request from "../utils/common_request";
const APPKEY = "c5211b57dddfee5c";

export function requestSingle(currency) {
	return request("https://api.jisuapi.com/exchange/single",{
		appkey:APPKEY,
		currency: currency
	},{
		method: "GET"
	})
}

export function requestAllCurrency() {
	return request("https://api.jisuapi.com/exchange/currency",{
		appkey:APPKEY
	},{
		method: "GET"
	})
}

export function requestExchangeCurrency(from, to, amount) {
	return request("https://api.jisuapi.com/exchange/convert",{
		appkey:APPKEY,
		from: from,
		to: to,
		amount: amount
	},{
		method: "GET"
	})
}